<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body>
    <div id="app"></div>
    <script src="https://unpkg.com/react@^16/umd/react.production.min.js"></script>
    <script src="https://unpkg.com/react-dom@16.13.0/umd/react-dom.production.min.js"></script>
    <script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script>
    <script type="text/babel">
      // ReactDOM.render(组件,元素)
      // react函数类型组件
      // jsx 语法 xml html
      //JSX就是Javascript和XML结合的一种格式。React发明了JSX，利用HTML语法来创建虚拟DOM
      function Navcom() {
        return (
          <ul>
            <li>首页</li>
            <li>汽车</li>
            <li>科技</li>
          </ul>
        )
      }
      ReactDOM.render(<Navcom />, document.getElementById('app'))
    </script>
  </body>
</html>
